package com.kakarote.oa.common;

import com.kakarote.core.common.Const;
import com.kakarote.core.common.ResultCode;

public enum OaCodeEnum implements ResultCode {

    /**
     * 列表
     */
    OA_CODE_ENUM(500, ""),
    EVENT_ALREADY_DELETE(501, "日程已删除"),
    EXAMINE_END_TIME_IS_EARLIER_THAN_START_TIME(502, "审批结束时间早于开始时间"),
    TRAVEL_END_TIME_IS_EARLIER_THAN_START_TIME(503, "差旅结束时间早于开始时间"),
    THE_APPROVAL_FLOW_HAS_BEEN_DISABLED_OR_DELETED(504, "该审批流已被停用或删除"),
    DURATION_MUST_BE_THREE_DIGITS(505, "时长必须是三位数"),
    CURRENT_USER_DOES_NOT_HAVE_APPROVAL_AUTHORITY(506, "当前用户没有审批权限"),
    THE_NAME_OF_THE_CUSTOM_FORM_CANNOT_BE_REPEATED(507, "自定义表单名称不能重复"),
    SYSTEM_EXAMINE_CAN_NOT_MODIFY(508, "系统审批类型暂不支持编辑"),
    LOG_ALREADY_DELETE(509, "日志已删除"),
    ANNOUNCEMENT_ALREADY_DELETE(510, "公告已删除"),
    EXAMINE_ALREADY_DELETE(511, "审批已删除"),
    TOTAL_REIMBURSEMENT_ERROR(512, "请完善明细！"),
    TOTAL_AMOUNT_OF_EXPENSE_DETAILS_ERROR(513, "报销费用明细(s%)合计应大于零"),

    REQUIRED_OPTIONS_CANNOT_BE_HIDDEN(514, "必填选项不能隐藏"),
    LOG_TEMPLATE_FIELDS_EMPTY_ERROR(515, "日志模板字段不能为空"),
    SYSTEM_LOG_TEMPLATE_CANNOT_DO(516, "系统日志模板不能%s"),

    CRM_SERIAL_NUMBER_DATA_EXIST_ERROR(2115, "自定义编号字段重复"),
    CRM_SERIAL_NUMBER_FIELD_LENGTH_ERROR(2100, "自定义编号类型字段不能超过200字符"),
    CRM_FIELD_NUM_ERROR(2002, "最多存在" + Const.QUERY_MAX_SIZE + "个字段"),
    THE_FIELD_NAME_OF_THE_FORM_CANNOT_BE_REPEATED(2087, "自定义表单字段名称不能重复"),
    CRM_TAG_FIELD_REPETITION_ERROR(2099, "标签类型字段只允许有一个"),
    THE_FIELD_NUM_RESTRICT_ERROR(2088, "自定义表单限制的数值格式错误"),
    THE_FIELD_DETAIL_TABLE_FORMAT_ERROR(2089, "请设置表格内的具体字段！"),
    CRM_PRINT_TEMPLATE_NOT_EXIST_ERROR(2044, "使用的打印模板不能为空"),
    CRM_PRINT_PRE_VIEW_ERROR(2045, "仅支持pdf和word格式预览"),
    DELETE_AFTER_STOP(2046, "停用后才可删除"),
    LOG_EMPTY_EXPORT_ERROR(2047, "没有日志数据可导出"),
    PRINT_TEMPLATE_NOT_LATEST(2048, "打印模板配置错误，请重新编辑"),
    OA_EXAMINE_EMAIL_TOKEN_ERROR(2049, "外部联系人审批链接过期！"),
    OA_EXAMINE_PARAM_ERROR(2050, "参数错误！"),

    OA_SUBMIT_LOG_ERROR(2051, "提交数量已达上限！");

    OaCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    private final Integer code;
    private final String msg;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return msg;
    }
}
